package ModelLayer;


/**
 * Write a description of class Person here.
 * 
 * @author (your name) 
 * @version (a version number or a date)
 */
abstract public class Person
{
    private String id;
    private String name;
    private String phone_nr;
    private String address;
    private String postal_code;
    private String city;
    /**
     * Constructor for objects of class Person
     * It assignes provided data to attributes of Person class
     */
    public Person(String i_id, String i_name, String i_phone_nr, String i_address, String i_postal_code, String i_city)
    {
        id = i_id;
        name = i_name;
        phone_nr = i_phone_nr;
        address = i_address;
        postal_code = i_postal_code;
        city = i_city;
    }
    /**********************************************************************************GETTERS**********************************************************************************************/
    
    /**
     * Returns Person's ID.
     */
    public String get_id()
    {
        return id;
    }
    
    /**
     * Returns Person's name.
     */
    public String get_name()
    {
        return name;
    }
    
    /**
     * Returns Person's phone number.
     */
    public String get_phone_nr()
    {
        return phone_nr;
    }
    
    /**
     * Returns Person's address.
     */
    public String get_address()
    {
        return address;
    }
    
    /**
     * Returns Person's postal code.
     */
    public String get_postal_code()
    {
        return postal_code;
    }
    
    /**
     * Returns Person's city.
     */
    public String get_city()
    {
        return city;
    }
    /**********************************************************************************SETTERS**********************************************************************************************/
    
    /**
     * Changes Person's name with provided input.
     */
    public void set_name(String input)
    {
        name = input;
    }
    
    /**
     * Changes Person's phone number with provided input.
     */
    public void set_phone_nr(String input)
    {
        phone_nr = input;
    }
    
    /**
     * Changes Person's address with provided input.
     */
    public void set_address(String input)
    {
        address = input;
    }
    
    /**
     * Changes Person's postal code with provided input.
     */
    public void set_postal_code(String input)
    {
        postal_code = input;
    }
    
    /**
     * Changes Person's city with provided input.
     */
    public void set_city(String input)
    {
        city = input;
    }
    
    /***************************************************************OTHER METHODS*****************************************************************/
    public String give_string_data()
    {        
        return String.format("%s\t%s\t%s\t%s\t%s\t%s", id, name, phone_nr, address, postal_code, city);        
    }
    
    public String printable()
    {
        return String.format("ID:\t\t\t\t%s \nName:\t\t\t\t%s \nPhone number:\t\t\t%s \nAddress:\t\t\t%s \n\t\t\t\t%s \n\t\t\t\t%s \n", id, name, phone_nr, address, postal_code, city);
    }
    
    

    
}
